using System.Configuration;
using System.Xml;
using System.Runtime.Serialization;
using System.IO;

namespace Microsoft.MSE.Catalog.Module.Configuration
{
    public class ConfigurationHandler : IConfigurationSectionHandler
    {
        object IConfigurationSectionHandler.Create(object parent, object configContext, XmlNode section)
        {
            DataContractSerializer ser = new DataContractSerializer(typeof (CatalogSvcConfig));
            CatalogSvcConfig cfg =
                (CatalogSvcConfig) ser.ReadObject(XmlReader.Create(new StringReader(section.InnerXml)));
            return (cfg);
        }
    }
}